package ${content.items.service.packageName};
<#assign assign_EntityName = content.items.entity.className>
<#assign tableName = content.content.tableName>
<#assign tableRemark = content.content.remark>
<#assign camelName = content.content.camelName>

import com.yixiekeji.core.FeignUtil.FeignUtil;
import com.yixiekeji.core.ServiceResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import ${content.items.entity.packageName}.${content.items.entity.className};
/**
 * ${tableName}${tableRemark}接口
 * @author liuyandeng
 *
 */
@FeignClient(name = FeignUtil.FEIGN_NAME_ORDER)
@Service(value = "${camelName?uncap_first}Service")
public interface I${assign_EntityName}Service{
    //获取${tableRemark}列表
    @RequestMapping(value = "get${assign_EntityName}List", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    ServiceResult<List<${assign_EntityName}>> get${camelName?cap_first}List(@RequestBody FeignUtil feignUtil);

  <#if content.content.primaryField??>
  <#assign assign_idFieldType = content.content.primaryField[0].fieldType>
  <#assign assign_idFieldName = content.content.primaryField[0].fieldName>
    //获取${tableRemark}详情
    @RequestMapping(value = "${camelName?uncap_first}/get${assign_EntityName}ById", method = RequestMethod.GET, consumes = MediaType.APPLICATION_JSON_VALUE)
    ServiceResult<${assign_EntityName}>  get${camelName?cap_first}ById(@RequestParam("id") ${assign_idFieldType} ${assign_idFieldName});
  </#if>

    //保存${tableRemark}
    @RequestMapping(value = "${camelName?uncap_first}/save${assign_EntityName}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    ServiceResult<Integer> save${camelName?cap_first}(@RequestBody ${assign_EntityName} ${camelName});

    //更新${tableRemark}
    @RequestMapping(value = "${camelName?uncap_first}/update${assign_EntityName}", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    ServiceResult<Integer>  update${camelName?cap_first}(@RequestBody ${assign_EntityName} ${camelName});

    //删除${tableRemark}
    @RequestMapping(value = "${camelName?uncap_first}/delete${assign_EntityName}", method = RequestMethod.DELETE, consumes = MediaType.APPLICATION_JSON_VALUE)
    ServiceResult<Integer> delete${camelName?cap_first}(@RequestParam("id") ${assign_idFieldType} ${assign_idFieldName});

}
